<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
<meta content="自客，老虎科技，自由职业者，任务制平台" name="keywords"/>
<meta content="自客(zike.com)是互联网中高端人才技能与知识分享平台；发任务找牛人上自客；接任务做兼职上自客。" name="description"/>
<link rel="shortcut icon" href="
">
<title>自客-职场知识技能共享平台 - 企业版</title>

<link rel="stylesheet" href="../css/sui.min.css">
<link rel="stylesheet" href="../css/common.css">

<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/sui.min.js"></script>
<script type="text/javascript" src="../js/admin_common.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

<script type="text/javascript">
var  IMG_PATH = "/Public/Company/images";
var  STATIC = "/Public/static";
var  ROOT = "#";
var  UPLOAD_PICTURE = "#";
var  UPLOAD_FILE = "#";
var  UPLOAD_DIALOG_URL = "#";
</script>
<!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->

</head>
<body>
	<!-- 头部 -->
	<!--提示-->
<div class="prompt"></div>


<!-- 导航条
================================================== -->
<!--header-->
    <header class="nav">
        <div class="nav-in pr">
            <span class="fl cp pr30">
            <a href="zhuye.html">
            <img src="images/logo.png" alt="自客LOGO" />
            </a>
            </span>

            <span class="company-span ">
                <a href="zhuye.html">首页</a>
                            </span><span class="company-span active head-active">
                <a href="#">发布管理</a>
                            </span><span class="company-span ">
                <a href="#">找自客</a>
                            </span><span class="company-span ">
                <a href="#">自客管理</a>
                            </span><span class="company-span ">
                <a href="#">交易中心</a>
                            </span>			
            
            <div id="user" class="pa user" style="z-index: 2"><i class="text-over maxw90">严事成</i>
            <i class="pr triangle">
            <img id="userimg" src="../images/triangle.png" alt=""></i>
                <!--     小红点-->
                <!---->

                
                <!--     个人设置-->
                <div id="drawer" style="display:none;z-index: 99999">
                    <div class="drawer mt18"><a href="#">账号中心</a></div>
                    <div class="drawer"><a href="#">修改密码</a></div> 
                    <div class="drawer"><a href="#">切换到自客版</a></div>
                    <div class="drawer border-bottom"><a href="#">退出登录</a></div>
                </div>
            </div>
                    </div>
    </header>
    
    <!-- 
    <div style="height:37px;"></div>     -->
    
	<!-- /头部 -->
	
	<!-- 主体 -->
	
  
  <div class="content">
  

   <!--sidebar-->
   	<div class="task-l">
   	<div class="task-head">
          <span class="site-bar font-s18 colorcbc">
          <i class="icon-icon_rwgl"></i>
          </span>
          <span class="ml-10">任务管理</span>
        </div>
        <div class="task-nav">
          <ul>
           <li class="pr"><a href="cmanage.html" class="active">发布新任务</a></li><li class="pr"><a href="http://www.ziwork.com/Company/Task/lists.html?mdm=251|252" class="">任务列表</a></li>          </ul>
        </div>      </div>      <!--sidebar-end-->
      
    
<link rel="stylesheet" href="../css/common.css">
<link rel="stylesheet" href="../css/task.css">

<!--分类开始-->
<div class="task-r">
        <div class="task-r-nav">
          <span>选择一个领域进行任务发布</span>
          
          <span class="font-s14 ml-10">（你已经发布了<span class="color040">0</span>个任务，还可以发布<span class="color040">10</span>个任务）</span>          
        </div>
        <div class="task-pub-r">     
          <ul>
           <li class="row">
           <div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('设计');">
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-5.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">设计</div>
                   <div class="font-s14 color929 mt18 text-over">Logo、VI、包装、画册、广告...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             <div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('技术');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-4.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">技术</div>
                   <div class="font-s14 color929 mt18 text-over">HTML、CSS、PHP、定制APP...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             </li>
             <li class="row"><div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('运营');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-7.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">运营</div>
                   <div class="font-s14 color929 mt18 text-over">新媒体运营、活动运营、内容运营、社区运营...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             <div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('市场');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-6.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">市场</div>
                   <div class="font-s14 color929 mt18 text-over">SEO、市场推广、公关、媒介、品牌...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             </li><li class="row"><div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('职能');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-8.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">职能</div>
                   <div class="font-s14 color929 mt18 text-over">人力资源、财务、审计、法务...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             <div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('产品');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-1.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">产品</div>
                   <div class="font-s14 color929 mt18 text-over">交互设计、原型设计、产品策划、产品咨询...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             </li><li class="row"><div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('金融');"   >
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-218.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">金融</div>
                   <div class="font-s14 color929 mt18 text-over">投融资、理财、风控、证券期货、保险...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             <div class="col-md-6 col-sm-6 col-xs-6">
               <div class="task-filed-list" >
               <a class="label_a" href="javascript:taskPost('其它');">
                 <div class="col-md-3 col-sm-3 col-xs-3 pt-10 pb-5">
                  <span class="pub-icon">
                  <img class="p-center" src="../images/icons/p-217.png" height="42" width="42" alt="" />
                  </span>
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-9 pl-0">
                   <div class="mt10">其他</div>
                   <div class="font-s14 color929 mt18 text-over">自由撰稿、翻译、摄影师、编辑、艺术...</div>
                 </div>
                 <div class="clear"></div>
               </a>
               </div>
             </div>
             
             </li><li class="row"></li>
          </ul>
        </div>
      </div>
      <!--分类-end-->
      <div class="clear"></div>
      
  </div>
</div>

	<!-- /主体 -->

	<!-- 底部 -->

<footer>
        <div>
            <div class="footer-end">
                <p>Copyright © 2017 版权所有&nbsp;&nbsp;V1.0</p>
            </div>
        </div>
    </footer>

<script type="text/javascript" src="../js/task.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>

<script type="text/javascript">
 
 //任务发布框href转向
 function taskPost(taskType){
	 var type=taskType
	 $.post("/taskPostHandler",{taskType:type});
 }

 $('.J_city_select').city_select({field: 'J_deal_city',deep_max:2});


 //不可以添加任务
 function notAddTask(){
	 $.alert("免费用户限发布10个任务，如需增加请联系客服：kefu@thetiger.com.cn");
 }


//项目周期
 $("input[name='cycle_day']").keyup(function(){
      var cyinput = $(this).val();
      if(cyinput.length>3){
    	  $(this).val(cyinput.substring(0, 3));
    	  $.toast({text: '项目周期最多3位数',type: 'danger',position: 'top center'}).show();
          return;
      }
  });

 //所需人数
 $("input[name='number']").keyup(function(){
     var number = $(this).val();
     if(number.length>4){
     	$(this).val(number.substring(0, 4));
     	$.toast({text: '所需人数最多4位数',type: 'danger',position: 'top center'}).show();
         return;
     }
 });
 //最低价
  $("input[name='price_min']").keyup(function(){
     var price_min = $(this).val();
     if(price_min.length>7){
     	$(this).val(price_min.substring(0, 7));
     	$.toast({text: '最低价最多7位数',type: 'danger',position: 'top center'}).show();
         return;
     }
 });
//最高价
  $("input[name='price_max']").keyup(function(){
      var price_max = $(this).val();
      if(price_max.length>7){
      	$(this).val(price_max.substring(0, 7));
      	$.toast({text: '最高价最多7位数',type: 'danger',position: 'top center'}).show();
          return;
      }
  });

  //发布新任务
  var inputRadio=$(".hiddenInput"),
      inputClass=$(".hiddenInput").siblings('.inputUi');
      skillList =$(".skill-block ul li");
  inputRadio.click(function(event) {
      if(inputClass.hasClass('icon-icon_unchoose')){
          inputClass.addClass('color040 icon-icon_choose').removeClass('color929 icon-icon_unchoose');
      }else{
          inputClass.removeClass('color040 icon-icon_choose').addClass('color929 icon-icon_unchoose');
      }
  });
  skillList.click(function(event) {
      var skillNum = 0;
      var skillStr = "";
      var skillArr = [];

      skillList.each(function(index, el) {
          if($(el).hasClass('active')){
              skillNum++;
          }
      });
      if(skillNum<4){
          $(this).toggleClass('active');
			var i = 0;
          skillList.each(function(index, el) {
              if($(el).hasClass('active')){
                  var data_id = $(el).attr('data-id');
                  skillArr[i] = data_id;
                  i++;
              }
          });
          skillStr = skillArr.join(",");
          $("input[name='skill_ids']").val(skillStr);
      }else{
          if($(this).hasClass('active')){
              $(this).toggleClass('active');
          }else{ 
        	  $.toast({text: '技能标签最多只能选择4个。',type: 'danger',position: 'top center'}).show();
          }
      }
  });
  
  
 $("#taskDescribe").keyup(function(){
      var describe = $("#taskDescribe").val();
      var describelen = describe.length;
      $("#describetxt").html("<span>"+describelen + "</span>/500");
      if (describelen > 500) {
      	var des = describe.substring(0, 500);
      	$("#taskDescribe").val(des);
      	$("#describetxt").html("<span>500</span>/500");
      	$.toast({text: '已超过限制字数500了',type: 'danger',position: 'top center'}).show();
          return;
      }
  });


  
  $("#AddTask").click(function(){

	  var title     = $("input[name='title']").val();
	  var number    = $("input[name='number']").val();
	  var work_type = $("input[name='work_type']").val();
	  var cycle_type = $("input[name='cycle_type']").val();
	  var cycle_value_p = $("input[name='cycle_value_p']").val();
	  var cycle_value_t = $("input[name='cycle_value_t']").val();

      var price_min = $("input[name='price_min']").val();
	  var price_max = $("input[name='price_max']").val();
	  
	  var describe = $("textarea[name='describe']").val();

	  var skills = $("input[name='skill_ids']").val();
	  
	  var _self = $(this);
	  
	  var go = _self.attr('go');
	  if(go == "0"){
		  $.toast({text: '正在提交中...',type: 'danger',position: 'top center'}).show();
          return false;
      }
	  
	  var titleReg   = !!title.match(/^[\u4e00-\u9fa5\-，。！、【】\[\]()（）……a-zA-Z\d]{2,50}$/gi);
	  var peopleReg  = !!number.match(/^[0-9]*$/gi);
      var minimumReg = !!price_min.match(/^[0-9]*$/gi);
      var highestReg = !!price_max.match(/^[0-9]*$/gi);
	  
	  if (!title || title == 0) {
		  $.toast({text: '任务名称不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      }  else if(title.length < 2 || title.length > 50){
    	  $.toast({text: '任务名称需为2-50个字符',type: 'danger',position: 'top center'}).show();
           return false;
      } else if (!number || number == "" || number == 0) {
    	  $.toast({text: '所需人数不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (peopleReg == false) {
    	  $.toast({text: '所需人数需为整数数字',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (!work_type || (work_type != 1 && work_type != 2 && work_type != 3)) {
    	  $.toast({text: '请选择工作形式',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (!cycle_type || (!cycle_value_p && !cycle_value_t)) {
    	  $.toast({text: '请选择项目周期',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (!price_min || price_min == "") {
    	  $.toast({text: '最低价格不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (minimumReg == false) {
    	  $.toast({text: '最低价格需为整数数字',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (price_min < 500) {
    	  $.toast({text: '最低价格不得低于500',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (!price_max || price_max == "" || price_max == 0) {
    	  $.toast({text: '最高价格不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (highestReg == false) {
    	  $.toast({text: '最高价格需为整数数字',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (parseInt(price_min) > parseInt(price_max)) {
    	  $.toast({text: '最高价格不得低于最低价',type: 'danger',position: 'top center'}).show();
          return false;
      } else if ((parseInt(price_max) / parseInt(price_min)) > 3) {
    	  $.toast({text: '任务最高价不能高于最低价的3倍',type: 'danger',position: 'top center'}).show();
          return false;
      } else if ((parseInt(price_max) / parseInt(price_min)) < 1.5) {
    	  $.toast({text: '任务最高价不能低于最低价的1.5倍',type: 'danger',position: 'top center'}).show();
          return false;
      }

	  var checkcity = 0;
		$(".J_city_select").each(function(i,e){
			$(e).find("option").each(function(ii,ee){
				if($(ee).val() && $(ee).prop("selected")){
					checkcity++;
				}
			});
		});
		if(checkcity != 2){
			$.toast({text: '招聘城市还没选择哦',type: 'danger',position: 'top center'}).show();
	        return false;
		}

      var skills_len = skills.split(",");
		
      if (!skills) {
    	  $.toast({text: '所需技能不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      }else if (skills_len.length > 4) {
    	  $.toast({text: '所需技能最多选择4个',type: 'danger',position: 'top center'}).show();
          return false;
      } else if (!describe || describe.length == 0) {
    	  $.toast({text: '任务详情不能为空哦',type: 'danger',position: 'top center'}).show();
          return false;
      } else if(describe.length > 500){
    	  $.toast({text: '任务详情不能超过500字',type: 'danger',position: 'top center'}).show();
          return false;
      } else if(describe.length < 10){
    	  $.toast({text: '任务详情不能小于10字',type: 'danger',position: 'top center'}).show();
          return false;
      }


      $.confirm("提示", "保存后，预算区间将不可编辑", function() { 
    	  var query  = $("#form").serialize();
    	  var target = $("#form").attr("action");

    	  _self.attr('go',0);
    	  _self.html('提交中...');
    	  $.post(target,query).success(function(data){
    		  _self.attr('go',1);
        	  _self.html('提交');
              if (data.status==1) {
                     $.toast({text: data.info + ' 页面即将自动跳转~',type: 'success',position: 'top center'}).show();
                     setTimeout(function(){
                          location.href=data.url;
                     },2000);
              }else{
            	  $.toast({text: data.info,type: 'danger',position: 'top center'}).show();
              }
          });
    	  
      }, function() { 
    	  return false;
     });
	 
  });

  </script> 
 <!-- 用于加载js代码 -->
<!-- 页面footer钩子，一般用于加载插件JS文件和JS代码 -->
<div style='display:none'><script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>$.post("");</script></div>
<div class="hidden"><!-- 用于加载统计代码等隐藏元素 -->
	
</div>


<!--回到顶部-->
<div class="toTop">
    <div class="up-list">
        <div class="wechat-code">
            <div><span class="font-s20 icon-icon_appdownlow"></span></div>
            <div><span>APP</span></div>
        </div>
        <div class="new-code float-left-code hidden"><img src="/Public/Company/new_style/images/codetop.png" width="159" height="151" alt=""></div>
    </div>
    <div class="up-list feed-biding-show">
        <div><span class="font-s18 icon-feedback"></span></div>
        <div><span>反馈</span></div>
    </div>
    <div class="up-list back-icon" style="display: none;">
        <div><span class="font-s14 icon-backtop"></span></div>
    </div>
</div>

<!--反馈弹窗-->
<div class="bidding-competitive2 feed-biding" style="display: none;">
    <div class="feedback flex">
        <div class="feedback-head">
            <div class="tc font-s16 p-t30 m-b21">用户反馈</div>
            <div class="feed-summary pr">
                <textarea maxlength="500" id="feed-text" class="feed-textarea font-s14" placeholder="您好，请将您的意见、想法、建议或投诉内容告诉我们，以帮助我们为您提供更加优质的服务。我们将在3个工作日内回复您的反馈。"></textarea>
                <span id="feed-val" class="pa feed-span color929">0/500</span>
            </div>
            <div class="flex">
                <input type="text" class="form-control form-com-input feed-w330 font-s14 pad-l14 m-l41" id="fee-input" placeholder="请输入您的手机或者邮箱（仅工作人员可见）">
                <span id="feed-subimt" type="submit" class="feed-button font-s14 cp" data-url="http://www.ziwork.com/Company/Index/Feedback.html">提交</span>
            </div>
            <div class="font-s12 color929 feed-ti">
                您还可以直接拨打服务热线：020-2816-3063 咨询
            </div>
        </div>
        <div class="feedback-right">
            <div class="pa cp fee-close icon-icon_upload_close font-s14 colordbd"></div>
            <div class="fright-p tc font-s14"><p>如果您的问题比较紧急</p><p>可以联系在线客服</p></div>
            <div class="fright-img tc"><img src="/Public/Home/images/bidding/icon_code4.png" alt=""></div>
            <div class="tc color929 font-s14">
                <span class="icon-icon_saoyisao"></span>
                <span>微信扫一扫</span>
            </div>
        </div>
    </div>
</div>

	<!-- /底部 -->
</body>
</html>